Ext.define('Jee.model.security.user.UserModel',{
    extend: 'Jee.model.JeeModel',
    alias : ['widget.userModel'],
    serviceId:'01_02_02_02',
    fields: [
    	 {name: 'id', mapping:'id'}, 
    	 {name: 'password'},
    	 {name: 'userName'}, 
    	 {name: 'realName'},
    	 {name: 'enabled',type:'boolean'},
    	 {name: 'org.id', mapping:function(data){
    		 if(data.org && data.org.id){
    			 return data.org.id;
    		 }else{
    			 return null;
    		 }
    	 }},
    	 {name: 'org.name', mapping:function(data){
    		 if(data.org && data.org.name){
    			 return data.org.name;
    		 }else{
    			 return null;
    		 }
    	 }}
    ]
  // ,  belongsTo: [{model: 'security.user.OrgModel', associationKey: 'org'}]
});